package eleanor.ltd.isRealEstate.entities.user;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.beaneditor.NonVisual;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.hibernate.annotations.NaturalId;

import eleanor.ltd.isRealEstate.entities.roles.group.RolesGroup;
import eleanor.ltd.isRealEstate.entities.user.group.UserGroup;

@Entity
@Table(name="users")
public class User {
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@NonVisual
	@Column(name = "uid")
	private Long id;
	@Property
	@Column(nullable = false, unique = true, name = "username")
	private String username;
	@Property
	@Column(nullable = false, name = "password")
	private String password;
	@Property
	@Column(name = "emailAddress")
	private String emailAddress;
	@Property
	@Column(name = "dateCreated")
	private Date dateCreated;
	@Property
	@Column(name="activeOrNot")
	private String activeOrNot;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getEmailAddress() {
		return emailAddress;
	}
	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}
	public Date getDateCreated() {
		return dateCreated;
	}
	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}
	public String getActiveOrNot() {
		return activeOrNot;
	}
	public void setActiveOrNot(String activeOrNot) {
		this.activeOrNot = activeOrNot;
	}
	
	
	
	
	
	 
	
}
